# a1 = [1,4,7,29]
# sum1 = 0
# for i in a1:
#     sum1 += i
# print(sum1)
#
# a2 = [19,5,12,6]
# sum2 = 0
# for i in a2:
#     sum2 += i
# print(sum2)
#
# a3 = [123,6,2,7]
# sum3 = 0
# for i in a3:
#     sum3 += i
# print(sum3)

# def getSum(a):
#     sum = 0
#     for i in a:
#         sum += i
#     return sum
#
# a1 = [1,4,7,29]
# a2 = [19,5,12,6]
# a3 = [123,6,2,7]
#
# sum1 = getSum(a1)
# sum2 = getSum(a2)
# sum3 = getSum(a3)
#
# print(sum1)
# print(sum2)
# print(sum3)

# def test(a,b):
#     print(a)
#     print(b)
#
# test(12,"123232")


# def test(a,b):
#     return a+b
#
# print(test(12,4))

# def test(a):
#     if a % 2 ==0:
#         return 1
#     else:
#         return 10
#
# print(test(3))

# def test():
#     a = 1
#     b = 3
#     return a,b
# x,y = test()
# print(x,y)

# def test():
#     x = 10
#     y = 20
#     return x,y
# test()
# print(x,y)

# x = 10
# def test():
#     x = 5
#     print(f"函数内部: {x}")
# test()
# print(f"函数外部: {x}")

# x = 10
# def test():
#     print(f"结果为: {x}")
# test()

# x = 10
# def test():
#     global x
#     x = 30
#     print(f"内部的值: {x}")
# test()
# print(f"外部的值: {x}")

# for i in range(1,10):
#     print(f"内部: {i}")
# print(f"外部: {i}")

# def test():
#     print("代码1")
#     print("代码2")
#     print("代码3")
# print("1")
# test()
# print("2")
# test()
# print("3")


# def test1():
#     return 5
# def test2():
#     print(test1())
#     return 7
# print(test2())

# def test(n):
#     if n == 1:
#         return 1
#     return n * test(n-1)
# print(test(5))

# def test(n):
#     return n * test(n-1)
# print(test(5))

# def test(x,y,z=False):
#     if z == False:
#         return x+y
#     else:
#         return x
# print(4,8)
# print(2,7,True)

# def test(x,z=False,y):
#     if z == False:
#         return x+y
#     else:
#         return x
# print(4,8)

def test(x,y):
    if x % 2==0 :
        return x+y
    else:
        return x
print(test(x=100,y=4))
print(test(y=19,x=1))